package com.group.three.mapper;


import com.github.pagehelper.PageInfo;
import com.group.three.pojo.Comment;
import com.group.three.utils.SnowFlakeUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xueyong
 * @since 2022-11-03
 */
@Mapper
public interface CommentMapper {
    //查询留言板所有信息
    List<Comment> selectCommentAll();


    //后台留言板信息的删除
    int deleteComment(Long commentId);

    //关键词查询留言板信息
    List<Comment> selectCommentKeyWord(String keyWord);

    //提交插入留言信息
    int insertComment(@Param("commentId") Long commentId,@Param("personId") Long personId, @Param("commentContent") String commentContent, @Param("movieName") String movieName, @Param("addTime") String addTime);

    //电影页下方留言
    List<Comment> selectHomeComment(String movieName);
    //个人中心留言展示
    List<Comment> selectAdminComment(String personName);
    //前台留言数更新到后台
    int updateAdminComment( @Param("movieId") Long movieId, @Param("videoComments") Integer videoComments);
}
